<template>
  <div class="risk-count-container">
    <div class="risk-fix-part flex justify-space-between">
      <div class="risk-find fix-item">
        <div class="title">发现隐患</div>
        <div class="line"></div>
        <div class="count">
          <span class="count-number">{{ data.riskFind }}</span>
          <span class="count-unit">项</span>
        </div>
      </div>
      <div class="risk-fix fix-item">
        <div class="title">消除隐患</div>
        <div class="line"></div>
        <div class="count">
          <span class="count-number">{{ data.riskFix }}</span>
          <span class="count-unit">项</span>
        </div>
      </div>
    </div>
    <div class="risk-none-fix flex justify-space-between">
      <div class="risk-no-fix no-fix-item">
        <div class="title">未消除隐患</div>
        <div class="line"></div>
        <div class="count">
          <span class="count-number">{{ data.riskNoFix }}</span>
          <span class="count-unit">项</span>
        </div>
      </div>
      <div class="risk-over no-fix-item">
        <div class="title">逾期隐患</div>
        <div class="line"></div>
        <div class="count">
          <span class="count-number">{{ data.riskOverdue }}</span>
          <span class="count-unit">项</span>
        </div>
      </div>
      <div class="risk-over-pre no-fix-item">
        <div class="title">逾期预警</div>
        <div class="line"></div>
        <div class="count">
          <span class="count-number">{{ data.riskWarning }}</span>
          <span class="count-unit">项</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      data: {
        type: Object,
        default: () => {},
      }
    }
  }
</script>

<style lang="scss" scoped>
  .risk-count-container {
    padding: 0 9px;
    color: #fff;

    .risk-fix-part {
      margin:8px 0 10px;
    }

    .fix-item, .no-fix-item {
      height: 45px;
      text-align: center;
      /*font-size: 0;*/

      .line {
        margin: 0 auto 4px;
        background-size: 100% 100%;
        height: 1px;
      }

      .title {
        margin: 9px 0 4px;
        font-size: 7px;
        line-height: 1;
      }

      .count {
        line-height: 1;
      }

      .count-number {
        font-family: digital;
        font-size: 18px;
      }

      .count-unit {
        margin-left: 2px;
        color: rgba(155, 222, 240, 1);
        font-size: 6px;
      }
    }

    .fix-item {
      width: 96px;
      background: rgba(0,188,255,0.1);
      border: 1px solid rgba(68,240,255,1);

      .line {
        width: 73px;
        background-image: url("~assets/images/risk-line.png");
      }

      .count-number {
        color: rgba(0, 241, 255, 1);
      }
    }

    .risk-none-fix {
      height: 45px;
      padding: 0 25px;
      background: rgba(0,188,255,0.1);
      border: 1px solid rgba(68,240,255,1);

      .no-fix-item {
        width: 45px;

        .line {
          width: 45px;
          background-image: url("~assets/images/risk-line-2.png");
        }

        .count-number {
          color: rgba(255, 255, 0, 1)
        }
      }
    }
  }
</style>
